package org.logtime.blog.pojo;

import java.text.SimpleDateFormat;
import java.util.Date;
import org.logtime.blog.annotation.Element;
import org.logtime.blog.annotation.Key;
import org.logtime.blog.annotation.Persistent;

/**
 * @version: 1.0
 * @Author: itmins
 * @Email: itmins@gmail.com
 */
@Persistent
public class User {

	@Key
	private Long id;

	@Element
	private String name;

	@Element
	private String email;

	@Element
	private Long level;

	@Element
	private String password;

	@Element
	private String registerFrom;

	@Element
	private String registerDate;

	public User() {
		this.registerDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
				.format(new Date());
	}

	public User(Long level, String name, String email, String password,
			String registerFrom) {
		this();
		this.name = name;
		this.level = level;
		this.email = email;
		this.password = password;
		this.registerFrom = registerFrom;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getLevel() {
		return level;
	}

	public void setLevel(Long level) {
		this.level = level;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getRegisterFrom() {
		return registerFrom;
	}

	public void setRegisterFrom(String registerFrom) {
		this.registerFrom = registerFrom;
	}

	public String getRegisterDate() {
		return registerDate;
	}

	public void setRegisterDate(String registerDate) {
		this.registerDate = registerDate;
	}
}